package zhtt;

import org.hibernate.Session;
import org.junit.Test;
import zhtt.HbnUtil;
import zhtt.JunitTestUtil;
import zhtt.demo01.Student;

/**
 * Created by zhtt on 2017/4/18.
 */
public class Demo01Test   {

    @Test
    public void save(){
        Session session= HbnUtil.getSession();
        session.beginTransaction();
        Student student=new Student("hello",50,90);
        session.save(student);
        session.getTransaction().commit();
    }
}
